<?php
defined('IN_ADMIN') or exit('No permission resources.');
include $this->admin_tpl('header','Admin');?>
<form name="myform" action="<?php echo U('listorder'); ?>" method="post">
<div class="pad_10">
<div class="table-list">
    <table width="100%" cellspacing="0" >
        <thead>
            <tr>
            <th width="30" align="center"><input type="checkbox" value="" id="check_box" onclick="selectall('aid[]');"></th>
            <th><?php echo L('desc');?></th>
            <th>ID</th>
            <th ><?php echo L('identifier');?></th>
            <th align='center'><?php echo L('platformname');?></th>
            <th align='center'><?php echo L('platform_url');?></th>            
            <th align='center'><?php echo L('platform_id');?></th>           
            <th align='center'><?php echo L('updatetime');?></th>
			<th ><?php echo L('operations_manage');?></th>
            </tr>
        </thead>
    <tbody>
   <?php foreach ($result as $key => $v) { ?>
   		<tr>
   			<td align="center">
        <input type="checkbox" name="aid[]" value="<?php echo $v['id']?>">
        </td>
        <td align='center'><input type="text" name="listorder[<?php echo $v['id'] ?>]" size="3" value="<?php echo $v['listorder'] ?> " class="input-text-c input-text"></td>
        <td align='center'><?php echo $v['id'] ?></td>
   			<td align='center'><?php echo $v['identifier'] ?></td>
   			<td align='center'><?php echo $v['name'] ?></td>
   			<td align='center'><a href="<?php echo $v['url'] ?>" rel="nofollow" target="_blank">点击查看</a></td>             
        <td align='center'><?php echo $v['clientip']?></td>    
        <td align='center'><?php echo date("Y-m-d H:i:s",$v['dateline']);?></td>  			
   			<td align='center'>
        <a href="javascript:edit('<?php echo $v['id']; ?>', '<?php echo safe_replace($v['name']); ?>');void(0);"><?php echo L('update_platfom'); ?></a>
        <a href="javascript:deletes(<?php echo $v['id'] ?>)" ><?php echo L('delete_plaform'); ?></a>
        </td>
   		</tr>
   <?php  } ?>
    </tbody>
    </table>
    <div class="btn"><label for="check_box"><?php echo L('selected_all')?>/<?php echo L('cancel')?></label>&nbsp;&nbsp;<input name="submit" type="submit" class="button" value="<?php echo L('remove_all_selected')?>" onClick="document.myform.action='?m=Document&c=Platform&a=deletes';return confirm('<?php echo L('affirm_delete')?>')">&nbsp;&nbsp;</div>
        <div id="pages"><?php echo $pages ?></div>
        </div>
</div>
</div>
</form>
</body>
</html>
<script type="text/javascript">
window.top.$('#display_center_id').css('display','none');
function edit(id, title) {
  window.top.art.dialog({id:'edit'}).close();
  window.top.art.dialog({title:'<?php echo L('edit_announce')?>--'+title, id:'edit', iframe:'?m=Document&c=Platform&a=update&id='+id ,width:'500px',height:'250px'}, function(){var d = window.top.art.dialog({id:'edit'}).data.iframe;
  var form = d.document.getElementById('dosubmit');form.click();return false;}, function(){window.top.art.dialog({id:'edit'}).close()});
}
function deletes(id){
  if(confirm("<?php echo L('affirm_delete')?>") == true){
    window.location.href = "?m=Document&c=Platform&a=delete&id="+id;
  }
}
</script>
